#ifndef __UP_SPI_H
#define __UP_SPI_H

#include "UP_config.h"
#include <stdio.h>
#include <string.h>

extern void SPI_init(uint32_t spi_periph);

extern void SPI_init_with_config(uint32_t spi_periph, UP_SPI *uc_spi);

unsigned char SPI_read(uint32_t spi_periph);

void SPI_write(uint32_t spi_periph, unsigned char data);

#endif // !__UP_SPI_H
